﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using 简单了解Graphics操作;

namespace 简单了解Graphics操作
{
    public partial class Form2 : Form
    {
        public Form2()
        {
            InitializeComponent();
        }

        private void Form2_Paint(object sender, PaintEventArgs e)
        {
            Graphics g = e.Graphics;
            Pen pen = new Pen(Color.BlueViolet, 3);

            g.DrawEllipse(pen, 50, 50, 100, 120);

            g.DrawEllipse(pen, 200, 200, 180, 180);

            //给指定坐标圆填充颜色
            g.FillEllipse(new SolidBrush(Color.Pink), 200, 200, 180, 180);
        }
    }
}